import 'package:flutter/material.dart';
import 'package:kq_flutter_core_widget/utils/kq_screen_util.dart';
import 'package:kq_flutter_widgets/config/kq_global.dart';
import 'package:kq_flutter_widgets/resources/kq_theme_colors.dart';
import 'package:kq_flutter_widgets/theme/configs/common/kq_common_theme_config.dart';
import 'package:kq_flutter_widgets/theme/configs/dialog/kq_dialog_theme_config.dart';
import 'package:kq_flutter_widgets/theme/configs/form/kq_form_theme_config.dart';
import 'package:kq_flutter_widgets/theme/configs/kq_theme_config.dart';
import 'package:kq_flutter_widgets/theme/configs/pullDown/kq_pullDown_theme_config.dart';
import 'package:kq_flutter_widgets/theme/kq_theme_manager.dart';

import '../config/global.dart';

class KqStyleUtil {
  /// 初始化主题
  static themeData() {
    /// 初始化KQ主题-黄色
    KqThemeManager.instance.register(
        KqThemeConfig(
          commonThemeConfig: KqCommonThemeConfig(
            mainColor: KqThemeColors.textYellow,
            mainLightColor: KqThemeColors.textRed,
          ),
          dialogConfig:
              KqDialogThemeConfig(mainBtnColor: KqThemeColors.textRed, bottomSheetBgColor: KqThemeColors.bgF5),
          formConfig: KqFormThemeConfig(
              mustInputFontSize: 14.sp,
              titleFontSize: 14.sp,
              paddingVertical: 15.r,
              contentFontSize: 14.sp,
              unitFontSize: 14.sp,
              headerFontSize: 14.sp),
          pullDownMenuThemeConfig: KqPullDownMenuThemeConfig(
              headFontSize: 14.sp,
              menuFontSize: 14.sp,
              selectColor: KqThemeColors.bgBlue),
        ),
        configId: Global.themeYellow);

    /// 初始化KQ主题-红色
    KqThemeManager.instance.register(
        KqThemeConfig(
          commonThemeConfig: KqCommonThemeConfig(
            mainColor: KqThemeColors.textRed,
            mainLightColor: KqThemeColors.textYellow,
          ),
          dialogConfig:
              KqDialogThemeConfig(mainBtnColor: KqThemeColors.textRed, bottomSheetBgColor: KqThemeColors.bgF5),
          formConfig: KqFormThemeConfig(
              mustInputFontSize: 14.sp,
              titleFontSize: 14.sp,
              contentFontSize: 14.sp,
              unitFontSize: 14.sp,
              headerFontSize: 14.sp),
          pullDownMenuThemeConfig: KqPullDownMenuThemeConfig(
              headFontSize: 14.sp,
              menuFontSize: 14.sp,
              selectColor: KqThemeColors.bgBlue),
        ),
        configId: Global.themeRed);

    /// 初始化KQ主题-蓝色
    KqThemeManager.instance.register(
        KqThemeConfig(
            commonThemeConfig: KqCommonThemeConfig(
              mainColor: KqThemeColors.bgBlue,
              mainLightColor: KqThemeColors.textLightBlue,
            ),
            dialogConfig:
                KqDialogThemeConfig(mainBtnColor: KqThemeColors.textLightBlue, bottomSheetBgColor: KqThemeColors.bgF5),
            formConfig: KqFormThemeConfig(
                mustInputFontSize: 14.sp,
                titleFontSize: 14.sp,
                contentFontSize: 14.sp,
                unitFontSize: 14.sp,
                headerFontSize: 14.sp),
            pullDownMenuThemeConfig: KqPullDownMenuThemeConfig(
                headFontSize: 14.sp,
                menuFontSize: 14.sp,
                selectColor: KqThemeColors.bgBlue)),
        configId: Global.themeBlue);

    /// 初始化KQ主题-黑色
    KqThemeManager.instance.register(
        KqThemeConfig(
            commonThemeConfig: KqCommonThemeConfig(
              mainColor: KqThemeColors.text26,
              mainLightColor: KqThemeColors.text59,
            ),
            dialogConfig:
                KqDialogThemeConfig(mainBtnColor: KqThemeColors.textRed, bottomSheetBgColor: KqThemeColors.bgF5),
            formConfig: KqFormThemeConfig(
                mustInputFontSize: 14.sp,
                titleFontSize: 14.sp,
                contentFontSize: 14.sp,
                unitFontSize: 14.sp,
                headerFontSize: 14.sp),
            pullDownMenuThemeConfig: KqPullDownMenuThemeConfig(
                headFontSize: 14.sp,
                menuFontSize: 14.sp,
                selectColor: KqThemeColors.bgBlue)),
        configId: Global.themeDark);
  }
}
